package com.jctrip.hotel.source.model.elong.req.offline;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Author: zxy
 * @CreateTime: 2023-09-19 19:27
 * @Description:
 */
@Data
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ElongCreateOrderReq {
    @JsonProperty("AffiliateConfirmationId")
    @ApiModelProperty(value = "合作伙伴订单确认号")
    private String affiliateConfirmationId;

    @JsonProperty("HotelId")
    @ApiModelProperty(value = "酒店编号")
    private String hotelId;

    @JsonProperty("RoomId")
    @ApiModelProperty(value = "展示房型编号")
    private String roomId;

    @JsonProperty(value = "RoomTypeId")
    @ApiModelProperty(value = "销售房型编号")
    private String roomTypeId;

    @JsonProperty("RatePlanId")
    @ApiModelProperty(value = "产品编号")
    private Integer ratePlanId;

    @JsonProperty("ArrivalDate")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(value = "入住日期")
    private Date arrivalDate;

    @JsonProperty("DepartureDate")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(value = "离店日期")
    private Date departureDate;

    @JsonProperty("HourRoomStartTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "钟点房入住开始时间")
    private Date hourRoomStartTime;

    @JsonProperty("HourRoomEndTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "钟点房入住结束时间")
    private Date hourRoomEndTime;

    @JsonProperty("CustomerType")
    @ApiModelProperty(value = "客人类型")
    private String customerType;

    @JsonProperty("PaymentType")
    @ApiModelProperty(value = "付款类型")
    private String paymentType;

    @JsonProperty("NumberOfRooms")
    @ApiModelProperty(value = "房间数量")
    private Integer numberOfRooms;

    @JsonProperty("NumberOfCustomers")
    @ApiModelProperty(value = "客人数量")
    private Integer numberOfCustomers;

    @JsonProperty("EarliestArrivalTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "最早到店时间")
    private Date earliestArrivalTime;

    @JsonProperty("LatestArrivalTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "最晚到店时间")
    private Date latestArrivalTime;

    @JsonProperty("CurrencyCode")
    @ApiModelProperty(value = "货币类型")
    private String currencyCode;

    @JsonProperty("TotalPrice")
    @ApiModelProperty(value = "总价")
    private BigDecimal totalPrice;

    @JsonProperty("CustomerIPAddress")
    @ApiModelProperty(value = "客人访问IP")
    private String customerIPAddress;

    @JsonProperty("IsGuaranteeOrCharged")
    @ApiModelProperty(value = "是否已担保或已付款")
    private Boolean isGuaranteeOrCharged;

    @JsonProperty("ConfirmationType")
    @ApiModelProperty(value = "确认类型")
    private String confirmationType;

    @JsonProperty("NoteToHotel")
    @ApiModelProperty(value = "给酒店备注")
    private String noteToHotel;

    @JsonProperty("NoteToElong")
    @ApiModelProperty(value = "给艺龙备注")
    private String noteToElong;

    @JsonProperty("IsNeedInvoice")
    @ApiModelProperty("是否需要发票")
    private Boolean isNeedInvoice;

    @JsonProperty("OrderRooms")
    @ApiModelProperty(value = "客人信息")
    private List<OrderRoom> orderRooms;

    @JsonProperty("Invoice")
    @ApiModelProperty("发票信息")
    private Invoice invoice;

    @JsonProperty("Contact")
    @ApiModelProperty(value = "联系人")
    private Contact contact;

    @JsonProperty("CreditCard")
    @ApiModelProperty(value = "信用卡")
    private CreditCard creditCard;

    @JsonProperty("DoveCorpCard")
    @ApiModelProperty(value = "第三方支付")
    private DoveCorpCard doveCorpCard;

    @JsonProperty("ExtendInfo")
    @ApiModelProperty(value = "扩展字段")
    private ExtendInfo extendInfo;

    @JsonProperty("IsCreateOrderOnly")
    @ApiModelProperty(value = "仅创建订单")
    private Boolean isCreateOrderOnly;

    @JsonProperty("CustomerPrice")
    @ApiModelProperty(value = "销售给客人的最终价格")
    private BigDecimal customerPrice;

    @JsonProperty("OrderValidation")
    @ApiModelProperty(value = "订单数据校验")
    private OrderValidation orderValidation;

    @JsonProperty("Coupon")
    @ApiModelProperty(value = "促销信息")
    private CouponInfo coupon;

    @JsonProperty("LittleMajiaId")
    @ApiModelProperty(value = "马甲Id")
    private String littleMajiaId;

    @JsonProperty("GoodsUniqId")
    @ApiModelProperty(value = "商品唯一标示")
    private String goodsUniqId;

    @JsonProperty("SpecificRemark")
    @ApiModelProperty(value = "特殊要求")
    private String specificRemark;

    @JsonProperty("ChildAges")
    @ApiModelProperty(value = "儿童年龄")
    private List<Integer> childAges;

    @JsonProperty("NumberOfAdults")
    @ApiModelProperty(value = "成人数")
    private Integer numberOfAdults;

    @JsonProperty("HotelCode")
    @ApiModelProperty(value = "酒店code")
    private String hotelCode;

    @JsonProperty("SupplierId")
    @ApiModelProperty(value = "供应商id")
    private String supplierId;

    @JsonProperty("SubSupplierId")
    @ApiModelProperty(value = "二级供应商id")
    private String subSupplierId;

    @JsonProperty("ShopperProductId")
    @ApiModelProperty(value = "商品库shopperid")
    private String shopperProductId;

    @JsonProperty("EncryptOption")
    @ApiModelProperty(value = "用户信息加密选项")
    private Integer encryptOption;

    @Data
    @Builder
    public static class Invoice implements Serializable {
        @JsonProperty("InvoiceType")
        @ApiModelProperty("发票类型")
        private String invoiceType;

        @JsonProperty("TitleType")
        @ApiModelProperty("抬头类型")
        private String titleType;

        @JsonProperty("Title")
        @ApiModelProperty(value = "抬头")
        private String title;

        @JsonProperty("ITIN")
        @ApiModelProperty(value = "纳税人识别号/统一社会信用代码")
        private String itin;

        @JsonProperty("ItemName")
        @ApiModelProperty(value = "发票内容")
        private String itemName;

        @JsonProperty("Amount")
        @ApiModelProperty(value = "金额")
        private BigDecimal amount;

        @JsonProperty("Recipient")
        @ApiModelProperty("收件人")
        private Recipient recipient;

        @JsonProperty("IsNeedRelationOrder")
        @ApiModelProperty(value = "是否添加发票备注")
        private boolean isNeedRelationOrder;

        @JsonProperty("TaxPayerNum")
        @ApiModelProperty(value = "纳税人识别号")
        private String taxPayerNum;

        @JsonProperty("TaxRegisterBank")
        @ApiModelProperty(value = "开户银行")
        private String taxRegisterBank;

        @JsonProperty("RegisterBankNum")
        @ApiModelProperty(value = "银行账号")
        private String registerBankNum;

        @JsonProperty("RegisterAddress")
        @ApiModelProperty(value = "注册地址")
        private String registerAddress;

        @JsonProperty("RegisterPhoneNum")
        @ApiModelProperty(value = "电话")
        private String registerPhoneNum;
    }

    @Data
    @Builder
    public static class Recipient implements Serializable {
        @JsonProperty("Province")
        @ApiModelProperty(value = "省份")
        private String province;

        @JsonProperty("City")
        @ApiModelProperty(value = "城市")
        private String city;

        @JsonProperty("District")
        @ApiModelProperty(value = "行政区")
        private String district;

        @JsonProperty("Street")
        @ApiModelProperty(value = "街道")
        private String street;

        @JsonProperty("PostalCode")
        @ApiModelProperty(value = "邮编")
        private String postalCode;

        @JsonProperty("Name")
        @ApiModelProperty(value = "收件人")
        private String name;

        @JsonProperty("Phone")
        @ApiModelProperty(value = "电话")
        private String phone;

        @JsonProperty("Email")
        @ApiModelProperty(value = "Email")
        private String email;
    }

    @Data
    @Builder
    public static class Contact implements Serializable {
        @JsonProperty("Name")
        @ApiModelProperty(value = "姓名")
        private String name;

        @JsonProperty("Email")
        @ApiModelProperty(value = "Email")
        private String email;

        @JsonProperty("Mobile")
        @ApiModelProperty(value = "手机")
        private String mobile;

        @JsonProperty("Phone")
        @ApiModelProperty(value = "电话")
        private String phone;

        @JsonProperty("Fax")
        @ApiModelProperty(value = "传真")
        private String fax;

        @JsonProperty("Gender")
        @ApiModelProperty(value = "性别")
        private String gender;

        @JsonProperty("FirstName")
        @ApiModelProperty(value = "名")
        private String firstName;

        @JsonProperty("LastName")
        @ApiModelProperty(value = "姓")
        private String lastName;
    }

    @Data
    public static class CreditCard implements Serializable {
        @JsonProperty("Number")
        @ApiModelProperty(value = "卡号")
        private String number;

        @JsonProperty("CVV")
        @ApiModelProperty(value = "CVV")
        private String cvv;

        @JsonProperty("ExpirationYear")
        @ApiModelProperty(value = "有效期-年")
        private int expirationYear;

        @JsonProperty("ExpirationMonth")
        @ApiModelProperty(value = "有效期-月")
        private int expirationMonth;

        @JsonProperty("HolderName")
        @ApiModelProperty(value = "持卡人")
        private String holderName;

        @JsonProperty("IdType")
        @ApiModelProperty(value = "证件类型")
        private String idType;

        @JsonProperty("IdNo")
        @ApiModelProperty(value = "证件号码")
        private String idNo;

        @JsonProperty("Mobile")
        @ApiModelProperty(value = "手机")
        private String mobile;
    }

    @Data
    public static class DoveCorpCard implements Serializable {
        @JsonProperty("Number")
        @ApiModelProperty(value = "卡号")
        private String number;

        @JsonProperty("ExpirationDate")
        @ApiModelProperty(value = "有效期")
        private String expirationDate;
    }

    @Data
    public static class ExtendInfo implements Serializable {
        @JsonProperty("String1")
        @ApiModelProperty(value = "扩展字段1")
        private String string1;

        @JsonProperty("String2")
        @ApiModelProperty(value = "扩展字段2")
        private String string2;

        @JsonProperty("String3")
        @ApiModelProperty(value = "扩展字段3")
        private String string3;

        @JsonProperty("Int1")
        @ApiModelProperty(value = "扩展字段4")
        private int int1;

        @JsonProperty("Int2")
        @ApiModelProperty(value = "扩展字段5")
        private int int2;

        @JsonProperty("Int3")
        @ApiModelProperty(value = "扩展字段6")
        private int int3;
    }

    @Data
    @Builder
    public static class OrderRoom implements Serializable {
        @JsonProperty("Customers")
        @ApiModelProperty(value = "入住人信息")
        private List<Customer> customers;
    }

    @Data
    @Builder
    public static class Customer implements Serializable {
        @JsonProperty("Name")
        @ApiModelProperty(value = "姓名")
        private String name;

        @JsonProperty("Gender")
        @ApiModelProperty(value = "性别")
        private String gender;

        @JsonProperty("Nationality")
        @ApiModelProperty(value = "国籍")
        private String nationality;

        @JsonProperty("IdCardNo")
        @ApiModelProperty(value = "证件号")
        private String idCardNo;

        @JsonProperty("IdCardType")
        @ApiModelProperty(value = "证件类型")
        private String idCardType;

        @JsonProperty("FirstName")
        @ApiModelProperty(value = "名")
        private String firstName;

        @JsonProperty("LastName")
        @ApiModelProperty(value = "姓")
        private String lastName;
    }

    @Data
    public static class OrderValidation implements Serializable {

        @JsonProperty("Type")
        @ApiModelProperty(value = "校验类型")
        private String type;

        @JsonProperty("GuaranteeAmount")
        @ApiModelProperty(value = "担保金额")
        private BigDecimal guaranteeAmount;

        @JsonProperty("CancelTime")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @ApiModelProperty(value = "最晚取消时间")
        private Date cancelTime;

        @JsonProperty("DateBreakFastList")
        @ApiModelProperty(value = "每日早餐数量列表")
        private List<DateBreakFast> dateBreakfastList;
    }

    @Data
    public static class DateBreakFast implements Serializable {
        @JsonProperty("Date")
        @ApiModelProperty(value = "日期")
        private Date date;

        @JsonProperty("BreakFastCount")
        @ApiModelProperty(value = "包含的早餐份数")
        private String breakfastCount;
    }

    @Data
    public class CouponInfo implements Serializable {

        @JsonProperty("Amount")
        @ApiModelProperty(value = "优惠总金额")
        private BigDecimal amount;

        @JsonProperty("NightlyCoupons")
        @ApiModelProperty(value = "每日促销详情")
        private List<NightlyCoupon> nightlyCoupons;
    }

    @Data
    public static class NightlyCoupon implements Serializable {
        @JsonProperty("Date")
        @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
        @ApiModelProperty(value = "在店日期")
        private Date date;

        @JsonProperty("PromotionRoomNights")
        @ApiModelProperty(value = "每间夜优惠详情")
        private List<PromotionRoomNight> promotionRoomNights;
    }

    @Data
    public static class PromotionRoomNight implements Serializable {

        @JsonProperty("Amount")
        @ApiModelProperty(value = "优惠金额")
        private BigDecimal amount;

    }
}
